import { ApiProperty, PartialType } from '@nestjs/swagger';
import { ResFailDto, ResSuccessDto } from 'src/tag/dto/base.dto';

enum state {
  start = 'start',
  stop = 'stop',
}

export class StartClockReqDto {
  @ApiProperty({
    required: true,
  })
  id: string;

  @ApiProperty({
    required: true,
    enum: state,
  })
  state: state;
}

export class StartClockResSuccessDto extends PartialType(ResSuccessDto) {
  @ApiProperty({
    required: true,
    description: '当前执行任务的唯一id',
  })
  run_id: string;
}

export class StartClockResFailDto extends PartialType(ResFailDto) {}
